package com.lening.provider.service.impl.ComplaintAndAdvice;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.provider.dao.ComplaintAndAdvice.ComplaSuggestionMainTableDAO;
import com.lening.provider.dto.ComplaintAndAdvice.ComplaSuggestionMainTableDTO;
import com.lening.provider.po.ComplaintAndAdvice.ComplaSuggestionMainTablePO;
import com.lening.provider.service.ComplaintAndAdvice.ComplaSuggestionMainTableService;
import com.lening.provider.vo.ComplaSuggestionMainTableVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 刘政华
 * @datetime 2024/6/4 10:13
 * @description 类对象
 */
@Slf4j
@Service
public class ComplaSuggestionMainTableServiceImpl extends BaseServiceImpl<ComplaSuggestionMainTableDAO, ComplaSuggestionMainTablePO, ComplaSuggestionMainTableDTO> implements ComplaSuggestionMainTableService {

    @Resource
    private ComplaSuggestionMainTableDAO complaSuggestionMainTableDAO;

    @Override
    public Page<ComplaSuggestionMainTableDTO> complaList(Page<ComplaSuggestionMainTableDTO> complaSuggestionMainTableDTO) {
        Page<ComplaSuggestionMainTableDTO> complaPage = complaSuggestionMainTableDAO.getList(complaSuggestionMainTableDTO);
        return complaPage;
    }

    @Override
    public long count() {
        return this.complaSuggestionMainTableDAO.count();
    }

    @Override
    public Page<?> page(ComplaSuggestionMainTableDTO complaSuggestionMainTableDTO) {
        return this.baseMapper.getList(complaSuggestionMainTableDTO);
    }

    @Override
    public ComplaSuggestionMainTableVO getById(Long id) {
        return this.complaSuggestionMainTableDAO.getById(id);
    }

    @Override
    public String add(ComplaSuggestionMainTablePO complaSuggestionMainTablePO) {
        return super.add(complaSuggestionMainTablePO);
    }
}
